************************************************************************************************
************************************************************************************************
* PAPER: Unspoken Hierarchies: The Enduring Effects of Caste Discrimination in Africa
* AUTHORS: Leonardo Arriola, Dominika Koter, Martha Wilfahrt
* JOURNAL: Perspectives on Politics
************************************************************************************************
************************************************************************************************

cd "/Users/marthawilfahrt/Dropbox/Caste in Senegal/Writing/Citizenship Paper/Submissions/Perspectives/Final Submission/AKW_Replication Data"

use "Caste_Final.dta", clear

label var SES "SES"
label var Age "Age"
label var Enqueteur_Casted "Casted Enumerator"
label var Casted_Only "Casted"
label var Noble "Noble"
label var SHO "Social Hierarchy"
label var Casted "Casted/Slave"
label var Accept_Caste_Friends "Accept Friends"
label var Religiosity "Religiosity"
label var Mandinka "Mande"
label var Peul "Peul"
label var SocialNetwork_Caste2 "Network Heterogeneity"
label var Freq_Interactions "Freq Interactions Index"
label var IntercasteMarriage_Index "Intermarriage Index"
label var Cross_Caste_Comfort "Cross-Caste Comfort"
label var Seperate_Bio "Biological Basis"
label var Seperate_EconComp "Econ Competition"
label var Seperate_Religion "Religious Instruction"
label var Seperate_Culture "Cultural Basis"
label var Respect_Differences2 "Respect Caste Norms"
label var Unfair_Caste "Unfair Treatment"
label var LastName_Insult "Name-based Insult"
label var Denied_Any "Denied Service/Right"
label var Accept_Index "Acceptance Index"
label var Advice_BreakUp "Advise No Marriage"
label var Bias_Index "Perceptions of Bias"
label var Gov_Act_Jobs "Gov Should Help Job"
label var Gov_Act_Housing "Gov Should Help Housing"
label var Gov_Act_Burial "Gov Should Help Burial"
label var Gov_Act_Mosque "Gov Should Help Mosque"
label var Gov_Help_Jobs "Gov Would Help Job"
label var Gov_Help_Housing "Gov Would Help Housing"
label var Gov_Help_Burial "Gov Would Help Burial"
label var Gov_Help_Mosque "Gov Would Help Mosque"
label var Religiosity "Religiosity"
label var Enqueteur_Casted "Casted Enumerator"

************************************************************************************************
*TABLE 1: SUMMARY STATISTICS OF RESPONDENTS' DEMOGRAPHIC PROFILE
************************************************************************************************

*SUMMARY STATISTICS
eststo Full_Sample: quietly estpost summarize ///
     Noble Peasant Casted_Only Slave SES Education Urban Female Age Peul Wolof Maure Serer Mandinka Religiosity Christian Mouride Tidjane
esttab Full_Sample using "Tables Output/SumStats_Demographics.tex", replace ///
	cells("mean (fmt(2)) sd (fmt(2)) min (fmt(2)) max (fmt(2))") ///
	label title("Summary Statistics of Respondents' Demographic Profile"\label{SumStats_Demo}) nonumbers wide mtitles("Full Sample" "Noble/Peasant" "Casted/Slave") 

************************************************************************************************	
*TABLE 2: CASTE IDENTITY AFFECTS THE LIKELIHOOD OF DISCRIMINATION
************************************************************************************************	

reg Unfair_Caste  Noble Casted_Only Slave    , cluster(EA_Name2) robust
eststo Unfair_Caste
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg Unfair_Caste  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Unfair_Caste2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  LastName_Insult  Noble Casted_Only Slave  , cluster(EA_Name2) robust or
eststo LastName_Insult
 estadd local  FE  "Yes"
 estadd local  DC  "No"
logit  LastName_Insult  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo LastName_Insult2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
logit  Denied_Any Noble Casted_Only Slave   , cluster(EA_Name2) robust or
eststo Denied_Any
 estadd local  FE  "Yes"
 estadd local  DC  "No"
logit  Denied_Any Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Denied_Any2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab Unfair_Caste Unfair_Caste2 LastName_Insult LastName_Insult2 Denied_Any Denied_Any2   using "Tables Output/Discrimination.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01)  modelwidth(2) keep( Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave  Enqueteur_Casted _cons) ///
	label title("Caste Identity Affects the Likelihood of Discrimination"\label{Discrimination}) compress eform(0 0 1 1 1 1) ///
	mtitles("Unfair Treatment" "Name-based Insult" "Denied Service/Right") addnote(Models 3-6 report odds ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)

************************************************************************************************	
*FIGURE 1: PERCEIVED UNDERSTANDINGS OF CASTE DIFFERENCES 
************************************************************************************************	
gen Reason_CasteSeperation2_2 = Reason_CasteSeperation2
replace Reason_CasteSeperation2_2 = "" if Reason_CasteSeperation2_2 == "Ignorance" | Reason_CasteSeperation2_2 == "They have not historically been kept apart"
encode Reason_CasteSeperation2_2, gen(Reason_CasteSeperation3)

gen Reason_CasteSeperation4 = .
replace Reason_CasteSeperation4 = 1 if Reason_CasteSeperation2_2 == "Cultural practice of our community"
replace Reason_CasteSeperation4 = 2 if Reason_CasteSeperation2_2 == "Economic competition"
replace Reason_CasteSeperation4 = 3 if Reason_CasteSeperation2_2 == "Biological differences (blood) between groups"
replace Reason_CasteSeperation4 = 4 if Reason_CasteSeperation2_2 == "Religious instruction"
label define Reason2 1 "Culture" 2 "Economics" 3 "Biology" 4 "Religion"
label values Reason_CasteSeperation4 Reason2

histogram Reason_CasteSeperation4, percent barwidth(.8) addlabel addlabopts(yvarformat(%3.1f)) ///
	xtitle("") ytitle(%) xlabel(, labels valuelabel) by(, legend(off)) by(Caste_Grp2) subtitle(, nobox) ///
	scheme(plotplain)

	
************************************************************************************************	
*TABLE 3: COMFORT WITH CROSS-CASTE RELATIONS
************************************************************************************************	
logit  Respect_Differences2  Noble Casted_Only Slave  , cluster(EA_Name2) robust or
eststo Respect_Differences
 estadd local  FE  "No"
 estadd local  DC  "Yes"
logit  Respect_Differences2  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Respect_Differences2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Cross_Caste_Comfort  Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Cross_Caste_Comfort
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Cross_Caste_Comfort  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Cross_Caste_Comfort2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  Accept_Index  Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Accept_Index
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Accept_Index  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Accept_Index2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
 
esttab Respect_Differences Respect_Differences2 Cross_Caste_Comfort Cross_Caste_Comfort2 Accept_Index Accept_Index2 using "Tables Output/Table5_HigherStatus.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	label title("Higher Status Groups Less Comfortable with Cross-Caste Relations"\label{Discrimination2})  compress eform(1 1 0 0 0 0) ///
	mtitles("Respect Differences" "Cross-Caste Comfort" "Acceptance Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)



	
************************************************************************************************
*FIGURE 2: WOULD ADVISE CHILD TO END CROSS-CASTE RELATIONSHIP
************************************************************************************************		
collapse (mean) Advice_BreakUp, by(Caste_Grp2)

gen Order = .
replace Order = 1 if Caste_Grp2 == 1
replace Order = 2 if Caste_Grp2 ==2
replace Order = 3 if Caste_Grp2 == 3
replace Order = 4 if Caste_Grp2 == 4

replace Advice_BreakUp = Advice_BreakUp *100

graph bar (asis) Advice_BreakUp, blabel(bar) ytitle(% Respondents) ytitle(, orientation(vertical)) ylabel(0(10)50) by(, legend(off)) by(Order, rows(1))


************************************************************************************************
*TABLE 4: HIGHER STATUS GROUPS ENFORCE MARRIAGE RESTRICTIONS
************************************************************************************************		
use "Caste_Final.dta", clear

logit  Advice_BreakUp  Noble Casted_Only Slave  , cluster(EA_Name2) robust or
eststo Advice_BreakUp
 estadd local  FE  "Yes"
 estadd local  DC  "No"
logit  Advice_BreakUp  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust or
eststo Advice_BreakUp2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo IntercasteMarriage_Index
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  IntercasteMarriage_Index  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo IntercasteMarriage_Index2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab Advice_BreakUp Advice_BreakUp2 IntercasteMarriage_Index IntercasteMarriage_Index2  using "Tables Output/Table6_HigherStatus_marriage.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep(Noble Casted_Only Slave Enqueteur_Casted _cons) ///
	order(Noble Casted_Only Slave Enqueteur_Casted _cons) eform(1 1 0 0 ) ///
	label title("Higher Status Groups Enforce Marriage Restrictions"\label{highercastemarriage})  compress  ///
	mtitles( "Advise Child No Marriage" "Network Intermarriage Index") addnote(Models 1-2 reports Odds Ratios. Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)

	

************************************************************************************************
*TABLE 5: POLICY PREFERENCES REGARDING DISCRIMINATION
************************************************************************************************		

reg Gov_Help_Jobs Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Jobs
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Jobs  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Jobs2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg Gov_Help_Housing Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Housing
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Housing  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Housing2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg Gov_Help_Burial Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Burial
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Burial  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Burial2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

reg Gov_Help_Mosque Noble Casted_Only Slave  , cluster(EA_Name2) robust
eststo Gov_Help_Mosque
 estadd local  FE  "Yes"
 estadd local  DC  "No"
reg  Gov_Help_Mosque  Noble Casted_Only Slave SHO SES Religiosity Education Urban Female Age Peul  Enqueteur_Casted  , cluster(EA_Name2) robust
eststo Gov_Help_Mosque2
 estadd local  FE  "Yes"
 estadd local  DC  "Yes"

esttab Gov_Help_Jobs Gov_Help_Jobs2 Gov_Help_Housing Gov_Help_Housing2 Gov_Help_Burial Gov_Help_Burial2 Gov_Help_Mosque Gov_Help_Mosque2 using "Tables Output/PolicyPrefs.tex", replace ///
	scalars(r2 "FE EA Fixed Effects" "DC Demographic Controls") se b(3) star(* 0.10 ** 0.05 *** 0.01) keep( Noble Casted_Only Slave Enqueteur_Casted  _cons) ///
	order(Noble Casted_Only Slave  Enqueteur_Casted _cons) ///
	label title("Policy Preferences Regarding Discrimination"\label{PolicyPrefs}) compress  ///
	mtitles("Jobs" "Housing" "Burial" "Mosque") addnote(Base Ethnic Group = Wolof; Base Social Group = Peasants. Models include enumerator fixed effects. Robust standard errors clustered by enumeration area.)
	
	
************************************************************************************************
*FIGURE 3: EFFECT OF ENUMERATOR'S CASTE RELATIVE TO RESPONDENT
************************************************************************************************		
* Diff
reg Unfair_Caste Enum_Diff_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0, cluster(EA_Name2) robust
	eststo Unfair_Caste_nc
reg Unfair_Caste Enum_Diff_Caste  Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1, cluster(EA_Name2) robust
	eststo Unfair_Caste_c
	
coefplot Unfair_Caste_c Unfair_Caste_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Unfair Treatment") legend(off) scheme(plotplain) name("Unfair", replace)

reg  Cross_Caste_Comfort Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_nc
reg  Cross_Caste_Comfort Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_c
	
coefplot Cross_Caste_Comfort_c Cross_Caste_Comfort_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Cross-Caste Comfort") legend(off) scheme(plotplain) name("CC", replace)


logit  Respect_Differences2 Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Respect_Differences_nc
logit  Respect_Differences2 Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Respect_Differences_c
	
coefplot Respect_Differences_c Respect_Differences_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Respect Differences") legend(off) scheme(plotplain) name("Diff", replace)

logit  Advice_BreakUp Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_nc
logit  Advice_BreakUp Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_c

coefplot Advice_BreakUp_c Advice_BreakUp_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Advise Break-Up") legend(off) scheme(plotplain) name("Advise", replace)
	
graph combine Unfair CC Diff Advise, ///
 row(1) scheme(plotplain) title("Enumerator Different Caste") name("Enum_Opp", replace)

 
*Same caste
reg Unfair_Caste Enum_Same_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0, cluster(EA_Name2) robust
	eststo Unfair_Caste_nc
reg Unfair_Caste Enum_Same_Caste  Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1, cluster(EA_Name2) robust
	eststo Unfair_Caste_c
	
coefplot Unfair_Caste_c Unfair_Caste_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("Unfair2", replace)

reg  Cross_Caste_Comfort Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul  if Casted == 0   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_nc
reg  Cross_Caste_Comfort Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul  if Casted == 1   , cluster(EA_Name2) robust
	eststo Cross_Caste_Comfort_c
	
coefplot Cross_Caste_Comfort_c Cross_Caste_Comfort_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("CC2", replace)


logit  Respect_Differences2 Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Respect_Differences_nc
logit  Respect_Differences2 Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Respect_Differences_c
	
coefplot Respect_Differences_c Respect_Differences_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("Diff2", replace)

logit  Advice_BreakUp Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_nc
logit  Advice_BreakUp Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1  , cluster(EA_Name2) robust 
	eststo Advice_BreakUp_c

coefplot Advice_BreakUp_c Advice_BreakUp_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(square_hollow) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-2(1)2) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("")  scheme(plotplain) name("Advise2", replace)

grc1leg Unfair2 CC2 Diff2 Advise2, ///
 row(1) scheme(plotplain) title("Enumerator Same Caste") legendfrom(Advise2) name("Enum_Same", replace)
  
graph combine Enum_Opp Enum_Same, ///
 row(2) scheme(plotplain) title("") 

 
************************************************************************************************
*FIGURE 4: POLICY PREFERENCES: EFFECT OF ENUMERATOR'S CASTE RELATIVE TO RESPONDENT 
************************************************************************************************		

reg  Gov_Help_Jobs  Enum_Diff_Caste  Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1 , cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_c
reg  Gov_Help_Jobs  Enum_Diff_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0 , cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_nc

coefplot Gov_Help_Jobs_c Gov_Help_Jobs_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Jobs") legend(off) scheme(plotplain) name("Jobs", replace)

reg  Gov_Help_Housing Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1 , cluster(EA_Name2) robust
	eststo Gov_Help_Housing_c
reg  Gov_Help_Housing Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul    if Casted == 0 , cluster(EA_Name2) robust
	eststo Gov_Help_Housing_nc

coefplot Gov_Help_Housing_c Gov_Help_Housing_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Housing") legend(off) scheme(plotplain) name("Housing", replace)

reg  Gov_Help_Burial Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul    if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_c
reg  Gov_Help_Burial Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul    if Casted == 0 , cluster(EA_Name2) robust
	eststo Gov_Help_Burial_nc

coefplot Gov_Help_Burial_c Gov_Help_Burial_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Burial") legend(off) scheme(plotplain) name("Burial", replace)

reg  Gov_Help_Mosque Enum_Diff_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1 , cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_c
reg  Gov_Help_Mosque Enum_Diff_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_nc
	
coefplot Gov_Help_Mosque_c Gov_Help_Mosque_nc, keep(Enum_Diff_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("Mosque") legend(off) scheme(plotplain) name("Mosque", replace)

graph combine Jobs Housing Burial Mosque, ///
 row(1) scheme(plotplain) title("Enumerator Different Caste") name("Enum_Diff", replace)

	
*Same caste
reg  Gov_Help_Jobs  Enum_Same_Caste  Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1 , cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_c
reg  Gov_Help_Jobs  Enum_Same_Caste  Noble SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0 , cluster(EA_Name2) robust
	eststo Gov_Help_Jobs_nc

coefplot Gov_Help_Jobs_c Gov_Help_Jobs_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("Jobs2", replace)

reg  Gov_Help_Housing Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1 , cluster(EA_Name2) robust
	eststo Gov_Help_Housing_c
reg  Gov_Help_Housing Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul    if Casted == 0 , cluster(EA_Name2) robust
	eststo Gov_Help_Housing_nc

coefplot Gov_Help_Housing_c Gov_Help_Housing_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("Housing2", replace)

reg  Gov_Help_Burial Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul    if Casted == 1, cluster(EA_Name2) robust
	eststo Gov_Help_Burial_c
reg  Gov_Help_Burial Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul    if Casted == 0 , cluster(EA_Name2) robust
	eststo Gov_Help_Burial_nc

coefplot Gov_Help_Burial_c Gov_Help_Burial_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("Burial2", replace)

reg  Gov_Help_Mosque Enum_Same_Caste   Slave SHO SES Religiosity Education Urban Female Age Peul   if Casted == 1 , cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_c
reg  Gov_Help_Mosque Enum_Same_Caste Noble   SHO SES Religiosity Education Urban Female Age Peul   if Casted == 0  , cluster(EA_Name2) robust
	eststo Gov_Help_Mosque_nc
	
coefplot Gov_Help_Mosque_c Gov_Help_Mosque_nc, keep(Enum_Same_Caste) vertical levels(95 90) ///
	yline(0, lcolor(black) lwidth(thin)) msymbol(diamond) mcolor(black) ciopts(lcolor(black black)) ///
	ytitle("") ylabel(-1(.5)1) xtitle("") plotregion(lcolor(black) lwidth(medium)) ///
	title("") legend(off) scheme(plotplain) name("Mosque2", replace)
 
grc1leg Jobs2 Housing2 Burial2 Mosque2, ///
 row(1) scheme(plotplain) title("Enumerator Same Caste") legendfrom(Mosque2) name("Enum_Same", replace)

  
graph combine Enum_Diff Enum_Same, ///
 row(2) scheme(plotplain) title("") 


 

	
	
	
	
